package com.xrkol.sharelib.util;

import java.io.IOException;
import java.util.Properties;

import org.springframework.core.io.support.PropertiesLoaderUtils;

/**
 * properties取值工具类
 * 
 * @author dipei.ruan
 *
 */

public class PropertiesUtil {

	private static Properties service_key_and_agent_id_prop;

	static {
		try {
			service_key_and_agent_id_prop = PropertiesLoaderUtils
					.loadAllProperties("agent.properties");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	/**
	 * 
	 * 获取AgentProperties的值
	 * @param key
	 * @return
	 */
	public static String loadAgentProperty(String key) {
		return service_key_and_agent_id_prop.getProperty(key);
	}

}
